package Liczbens;

import static org.junit.Assert.fail;
import junit.framework.TestCase;

public class LiczbaTest3 extends TestCase {

	private static String a;
	private static int b;

	protected void setUp() throws Exception {
		a = "10";
		b = 3;
	}
	
	public void testOne() throws Exception
	{
        try{
            Liczba x = new Liczba(a,b);
            Liczba laniewody = x;
            
            assertEquals("LanieWody",x,laniewody);
            assertTrue("Base", b < 17);
            assertFalse("Base", b < 2);
            assertNotNull("Liczba pusta?",x);
            
            for(int j = 2 ; j <= 16 ; j ++)
            {
                try{
                    System.out.println(j + ": " + x.zapis(j));
                }
                catch(LiczbaException le2){
                	fail("Bad input");
                    System.out.println( le2.getMessage() );
                    continue;
                }
            }
            System.out.println("");
        }
        catch(LiczbaException le1){
        	fail("Bad input");
            System.out.println( le1.getMessage() );
            System.out.println("");
        }
	}
}
